package com.example.datadashboard.controller;

import com.example.datadashboard.common.Result;
import com.example.datadashboard.dto.DashboardDTO;
import com.example.datadashboard.service.DashboardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/report")
public class ReportController {

    @Autowired
    private DashboardService dashboardService;

    @GetMapping
    public Result<DashboardDTO> getDashboardData() {
        return Result.success(dashboardService.getDashboardData());
    }
}
